<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>绝对定位</title>
		<style>
			.son {
				position: absolute;
				width: 300px;
				height: 300px;
				background-color: blue;
				top:100px;
				left:200px;
			}
			.father {
				/* position: absolute; */
				margin-top: 200px;
				width: 500px;
				height: 500px;
				background-color: green;
			}
			.grandfather{
				position: absolute;
				margin-top: 200px;
				width:600px;
				height: 600px;
				background-color: red;
			}
			.one {
				position: absolute;
				width:100px;
				height: 100px;
				background-color: yellow;
				top: 200px;
				right: 100px;
			}
			.two {
				width:100px;
				height: 100px;
				background-color: skyblue;
			}
		</style>
	</head>
	<body>
		<div class="grandfather">
			<div class="father">
				<div class="son"></div>
			</div>
		</div>
		
		<div class="one"></div>
		<div class="two"></div>
		
		
		
	</body>
</html>